import java.util.ArrayList;
import java.util.List;

public class demo3 {
    public static StringBuilder path=new StringBuilder();
    public static List<String> ret=new ArrayList<>();
    public static void main(String[] args) {
        func(0);
    }
    public static void func(int pos){
        ret.add(new String(path));
        for(int i=pos;i<3;i++){
            path.append((char)('a'+i));
            func(i+1);
            path.deleteCharAt(path.length()-1);
        }
    }
}
